<?php

return array(
		
		'view_manager' => array(
				'template_path_stack' => array(
					__DIR__ . '/../view'
				)
			),
		'service_manager' => array(
				'invokables' => array(
						'greetingService' => 'MyContent\Service\GreetingService'
						),
				'factories' => array(						
						'authService' => 'MyContent\Service\AuthServiceFactory'						
					)
				),
		'router' => array(
				'routes' => array(
					'view' => array(
							'type' => 'Zend\Mvc\Router\Http\Literal',
							'options' => array(
									'route' => '/view',
									'defaults' => array(
											'controller' => 'MyContent\Controller\Index',
											'action' => 'index',
											)
									)
							),
							
							'login' => array(
										'type' => 'Zend\Mvc\Router\Http\Literal',
												'options' => array(
														'route' => '/user/login',
														'defaults' => array(
																'controller' => 'MyContent\Controller\Auth',
																'action' => 'login',
														)
												)
										),
						'logout' => array(
								'type' => 'Zend\Mvc\Router\Http\Literal',
								'options' => array(
										'route' => 'user/logout',
										'defaults' => array(
												'controller' => 'MyContent\Controller\Auth',
												'action' => 'logout',
										)
								)
						)
						
						)
				),		
		'controllers' => array(				
						'factories' => array(
								'MyContent\Controller\Index'
										=> function($serviceLocator){
											$ctr = new MyContent\Controller\IndexController();
											
											$ctr->setGreetingService(
													$serviceLocator->getServiceLocator()
														->get('greetingService')
													);
											return $ctr;
										},
										'MyContent\Controller\Auth'
												=> 'MyContent\Controller\AuthControllerFactory'
										)								
								
						),
						'navigation' => array(
								'default' => array(
										'sayHello' => array(
												'label' => 'Say Hello !',
												'route' => 'sayHello',
										),
								),
						),
);